-
Notifications
You must be signed in to change notification settings - Fork 662
[Feat] Add Ray Cron Job #4159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[Feat] Add Ray Cron Job #4159
Conversation
| type RayCronJobSpec struct { | ||
| // JobTemplate defines the job spec that will be created by cron scheduling | ||
| JobTemplate *RayJobSpec `json:"jobTemplate"` | ||
| // Schedule is the cron schedule string | ||
| Schedule string `json:"schedule"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is alright, but I think we should introduce a separate struct (e.g. RayJobTemplateSpec) to hold both the metadata and the spec for the generated RayJob, similar to how Kubernetes models JobTemplateSpec in CronJob.
This would allow users to specify metadata inside jobTemplate, which we can then propagate to the created RayJob. It also keeps the API aligned with common Kubernetes patterns.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want this. In RayJobSpec when we specify the RayClusterSpec, we only set RayClusterSpec itself rather than also letting user set the ObjectMeta.
| RayClusterSpec *RayClusterSpec `json:"rayClusterSpec,omitempty"` |
cc @rueian for confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for it at the moment, this can be a future work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current structure looks good to me already.
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
Signed-off-by: machichima <[email protected]>
| rayVersion: '2.46.0' # should match the Ray version in the image of the containers | ||
| # Ray head pod template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use 2.52.0 version? thank you!
Why are these changes needed?
Support cron job scheduling. Following this design docs and implement milestone 1 in this PR
Main changes:
RayCronJobCRD and controllerRayCronJobTest
Apply the sample YAML
ray-operator/config/samples/ray-cronjob.sample.yaml. RayJobs are being scheduled every minute:Trigger validation error
Related issue number
Following comment: #2426 (comment)
Closes #2426
Checks